package com.star.langchain.learn.config;

import jakarta.annotation.PostConstruct;

import com.star.langchain.learn.myDefault.MyAiServiceStreamingResponseHandler;
import com.star.langchain.learn.service.ToolConfirmationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;


/**
 * 工具确认配置类
 * 在应用启动时初始化工具确认服务
 *
 * @author star
 */
@Configuration
public class ToolConfirmationConfig {

    @Autowired
    private ToolConfirmationService toolConfirmationService;

    @PostConstruct
    public void init() {
        // 设置工具确认服务到流式响应处理器
        MyAiServiceStreamingResponseHandler.setToolConfirmationService(toolConfirmationService);
    }
}

